from aiogram import types
from aiogram.filters import Filter

from app.config import Settings


class IsAdminFilter(Filter):
    async def __call__(
        self,
        message: types.Message | types.CallbackQuery,
        config: Settings = Settings(),
    ) -> bool:
        return message.from_user.id in config.tg_bot.admin_ids
